package com.hs.jhzd.entity;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

@Entity
@Table(name = "jh_QuestionnaireQuestion")
//出所问卷调查题目表
public class QuestionnaireQuestion {
    @Id
    private String id;   //题目id
    private String questionnaireId;//问卷类型id(关联外键)
    private int questionIndex;//问题角标
    private String question;//题目
    private Date createTime;//创建时间
    @OneToMany(targetEntity=QuestionnaireOption.class,mappedBy="questionId")
    private List<QuestionnaireOption> options;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getQuestionnaireId() {
        return questionnaireId;
    }

    public void setQuestionnaireId(String questionnaireId) {
        this.questionnaireId = questionnaireId;
    }

    public int getQuestionIndex() {
        return questionIndex;
    }

    public void setQuestionIndex(int questionIndex) {
        this.questionIndex = questionIndex;
    }

    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List<QuestionnaireOption> getOptions() {
        return options;
    }

    public void setOptions(List<QuestionnaireOption> options) {
        this.options = options;
    }
}
